seat=input()
try:
	a=int(seat[0:-1])
	if 1<=a<=17 and seat[-1] in ('A','B','C','D','F','a','b','c','d','f'):
		if seat[-1] in ('A','F','a','f'):
			print('窗口')
		if seat[-1] in ('C','D','c','d'):
			print('过道')
		if seat[-1] in ('B','b'):
			print('中间')
	else:
		print('输入错误')
except:
	print('输入错误')